﻿
using System;
using System.Web;
using System.Collections.Generic;
using BLToolkit.Mapping;
using BLToolkit.Data;
using BLToolkit.Reflection;

/// <summary>TripRule_id</summary>
public class TripRule : LoggingObject
{
	[Nullable]
	[MapField("TripRule_id")]
	public Int64 Id { get; set; }

	[Nullable]
	public Int64 Bus_id { get; set; }

	[Nullable]
	public Int64 Route_id { get; set; }

	[Nullable]
	[MapField("TripRule_Time")]
	public DateTime Time { get; set; }

	[Nullable]
	[MapField("TripRule_StartDT")]
	public DateTime StartDT { get; set; }

	[Nullable]
	[MapField("TripRule_EndDT")]
	public DateTime EndDT { get; set; }

	[Nullable]
	public Int64 TripRulePeriod_id { get; set; }


	[MapField("TripRule_Even")]
	public bool Even { get; set; }


	public bool Merge()
	{
		try
		{
			SetLoggingInfo();
			this.Id = DBEntity<TripRule>.Merge(this);
			return true;
		}
		catch { return false; }
	}
}
